import request from "@/utils/request";

// 监控查看列表
export function listMonitorList(query) {
  return request({
    url: `/backAdmin/merchantApi/monitor/list`,
    method: "get",
    params: query,
  });
}

// 员工申请详情
export function applyDetail(merchantId) {
  return request({
    url: `/backAdmin/merchantApi/merchant/detail?merchantId=${merchantId}`,
    method: "get",
  });
}

// 员工申请审核
export function applyCheck({ merchantId, status }) {
  return request({
    url: `/backAdmin/merchantApi/apply/check?merchantId=${merchantId}&status=${status}`,
    method: "post",
  });
}
// 申请列表
export function listMerchantApply(query) {
  return request({
    url: "/backAdmin/merchantApi/apply/list",
    method: "get",
    params: query,
  });
}

// 新增商家
export function addMerchant(data) {
  return request({
    url: `/backAdmin/merchantApi/merchant/add`,
    method: "post",
    data: data,
  });
}
// 删除商家
export function delMerchant(merchantIdList) {
  return request({
    url: `/backAdmin/merchantApi/merchant/delete?merchantIdList=${merchantIdList}`,
    method: "post",
  });
}

// 查询商家详细
export function getMerchant(merchantId) {
  return request({
    url: `/backAdmin/merchantApi/merchant/detail?merchantId=${merchantId}`,
    method: "get",
  });
}
// 查询商家列表
export function listMerchant(query) {
  return request({
    url: "/backAdmin/merchantApi/merchant/list",
    method: "get",
    params: query,
  });
}

// 修改商家
export function updateMerchant(data) {
  return request({
    url: "/backAdmin/merchantApi/merchant/update",
    method: "post",
    data: data,
  });
}
